package com.bootdo.kaoqin.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.kaoqin.dao.KaoqinCallGroupDao;
import com.bootdo.kaoqin.domain.KaoqinCallGroup;
import com.bootdo.kaoqin.service.KaoqinCallGroupService;



@Service
public class KaoqinCallGroupServiceImpl implements KaoqinCallGroupService {
	@Autowired
	private KaoqinCallGroupDao kaoqinCallGroupDao;
	
	@Override
	public KaoqinCallGroup get(Long id){
		return kaoqinCallGroupDao.get(id);
	}
	
	@Override
	public List<KaoqinCallGroup> list(Map<String, Object> map){
		return kaoqinCallGroupDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return kaoqinCallGroupDao.count(map);
	}
	
	@Override
	public int save(KaoqinCallGroup kaoqinCallGroup){
	
		if(kaoqinCallGroup.getId() != null) {
			return kaoqinCallGroupDao.update(kaoqinCallGroup);
		}else {
			return kaoqinCallGroupDao.save(kaoqinCallGroup);
		}		
	
		
	}
	
	@Override
	public int update(KaoqinCallGroup kaoqinCallGroup){
		return kaoqinCallGroupDao.update(kaoqinCallGroup);
	}
	
	@Override
	public int remove(Long id){
		return kaoqinCallGroupDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return kaoqinCallGroupDao.batchRemove(ids);
	}
	
}
